//
// Source code XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// (powered by Fernflower decompiler)
//

package com.jeeplus.modules.gen.template;

import freemarker.template.Configuration;
import freemarker.template.Template;
import java.io.StringWriter;
import java.util.Map;

public class FreemarkerHelper {
    private static Configuration _tplConfig = new Configuration();

    public FreemarkerHelper() {
    }

    public String parseTemplate(String tplName, String encoding, Map<String, Object> paras) {
        try {
            StringWriter e = new StringWriter();
            Template mytpl = null;
            mytpl = _tplConfig.getTemplate(tplName, encoding);
            mytpl.process(paras, e);
            return e.toString();
        } catch (Exception var6) {
            var6.printStackTrace();
            return var6.toString();
        }
    }

    public String parseTemplate(String tplName, Map<String, Object> paras) {
        return this.parseTemplate(tplName, "utf-8", paras);
    }

    static {
        _tplConfig.setClassForTemplateLoading(FreemarkerHelper.class, "/");
    }
}
